﻿using System;
using System.Collections.Generic;
using System.Text;
using Watchdog.Bll.Base;
using Watchdog.Bll.Factory;

namespace Watchdog.Bll {
    public partial class Schedule : ScheduleBase {
	
	// Modification to the class can be made into this file.
	// on regeneration of the project this file will not be changed.
        public void Lock () {
            intdata.Locked = DateTime.Now;
            Update ();
        }
        public void Unlock () {
            intdata.Locked = (DateTime)System.Data.SqlTypes.SqlDateTime.MinValue;
            Update ();
        }
        public bool Locked {
            get {
                if (intdata.Locked != System.Data.SqlTypes.SqlDateTime.MinValue)
                    return true;
                else
                    return false;
            }
        }
    }
}
